package com.example.wanandroid_copy2.ui.login.data.model

import android.content.Context
import android.content.Intent
import com.example.wanandroid_copy2.common.collect.CollectListener
import com.example.wanandroid_copy2.common.login.UserState
import com.example.wanandroid_copy2.ui.login.view.LoginActivity

class LogoutState : UserState {


    override fun collect(context: Context, position: Int, listener: CollectListener) {
        navigationToLoginPage(context)
    }

    override fun login(context: Context) {
        navigationToLoginPage(context)
    }

    override fun goCollectActivity(context: Context) {
        navigationToLoginPage(context)
    }

    private fun navigationToLoginPage(context: Context) {
        // 跳转到登录页面
        context.startActivity(Intent(context, LoginActivity::class.java))
    }
}